package interfaces.inputValidation;

import fileHandling.language.LanguageLoader;
import fileHandling.language.interfaces.Validation;

public class FloatInputChecker implements InputChecker {
	
	public FloatInputChecker() {}
	
	@Override
	public boolean isValid(String input) {
		try {
			float f = Float.valueOf(input).floatValue();
			return f >= 0f && f <= 1f;
		} catch(Exception e) {
			return false;
		}
	}
	
	@Override
	public String getDescription() {
		return LanguageLoader.get(Validation.NotFloat);
	}
}